﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NeosSDI.Transverse.Interfaces.Services;
using NeosSDI.Transverse.Models.ADO;

namespace NeosSDI.Services
{
    public partial class SampleService : ISampleService
    {


        /// <summary>
        /// Create the database
        /// </summary>
        /// <param name="script">creation sql script</param>
        public void CreateDatabase(string script)
        {
            SampleADORepository.CreateDatabase(script);
        }
        
        /// <summary>
        /// Check if database exists
        /// </summary>
        public bool CheckDatabaseExist()
        {
            return SampleADORepository.CheckDatabaseExist();
        }
        /// <summary>
        /// Get all sample
        /// </summary>
        /// <returns>List of sample</returns>
        public List<SampleADODTO> GetList(SearchCriteriaDTO criteria = null)
        {
            return SampleADORepository.GetList(criteria);
        }

        /// <summary>
        /// Get last five sample
        /// </summary>
        /// <returns>5 last sample</returns>
        public List<SampleADODTO> GetLastFiveSamples()
        {
            return SampleADORepository.GetLastFiveSamples();
        }
    }
}
